//
//  UIButton+Normal.m
//  DS_PJ_01
//
//  Created by admin on 16/7/16.
//  Copyright © 2016年 zhiqiyun. All rights reserved.
//

#import "UIButton+Normal.h"

@implementation UIButton (Normal)

//构造一个图片大小的Button
+ (UIButton *)buttonWithImageNamed:(NSString *)imageName
{
    UIImage *image = [UIImage imageNamed:imageName];
    UIButton *button = nil;
    
    if (image != nil) {
        button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = (CGRect){CGPointZero,image.size};
        [button setImage:image forState:UIControlStateNormal];
    }
    
    return button;
}

+(UIButton *)setButton_style_one
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    button.titleLabel.font = FONT(16);
    [button setBackgroundColor:[UIColor colorWithHexString:@"#2FA66D"]];
    
    return button;
}


@end
